home *** CD-ROM | disk | FTP | other *** search
Emacs Compiled Lisp | 1994-11-04 | 1.8 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: Emacs Compiled Lisp
(other/emacsCompiledLisp).
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
1%
| dexvert
| Emacs Compiled Lisp (other/emacsCompiledLisp)
| magic
| Unsupported |
100%
| file
| Emacs v18 byte-compiled Lisp data
| default
| |
99%
| file
| data
| default
| |
100%
| gt2
| Kopftext: '(provide (quote string))
| default (weak)
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 0a 28 70 72 6f 76 69 64 | 65 20 28 71 75 6f 74 65 |.(provid|e (quote|
|00000010| 20 73 74 72 69 6e 67 29 | 29 0a 0a 28 64 65 66 75 | string)|)..(defu|
|00000020| 6e 20 73 74 72 69 6e 67 | 2d 72 65 70 6c 61 63 65 |n string|-replace|
|00000030| 2d 6d 61 74 63 68 20 28 | 72 65 67 65 78 70 20 73 |-match (|regexp s|
|00000040| 74 72 69 6e 67 20 6e 65 | 77 74 65 78 74 20 26 6f |tring ne|wtext &o|
|00000050| 70 74 69 6f 6e 61 6c 20 | 6c 69 74 65 72 61 6c 20 |ptional |literal |
|00000060| 67 6c 6f 62 61 6c 29 20 | 22 5c 0a 52 65 70 6c 61 |global) |"\.Repla|
|00000070| 63 65 20 66 69 72 73 74 | 20 6d 61 74 63 68 20 6f |ce first| match o|
|00000080| 66 20 52 45 47 45 58 50 | 20 69 6e 20 53 54 52 49 |f REGEXP| in STRI|
|00000090| 4e 47 20 77 69 74 68 20 | 4e 45 57 54 45 58 54 2e |NG with |NEWTEXT.|
|000000a0| 0a 49 66 20 6e 6f 20 6d | 61 74 63 68 20 69 73 20 |.If no m|atch is |
|000000b0| 66 6f 75 6e 64 2c 20 6e | 69 6c 20 69 73 20 72 65 |found, n|il is re|
|000000c0| 74 75 72 6e 65 64 20 69 | 6e 73 74 65 61 64 20 6f |turned i|nstead o|
|000000d0| 66 20 74 68 65 20 6e 65 | 77 20 73 74 72 69 6e 67 |f the ne|w string|
|000000e0| 2e 0a 0a 4f 70 74 69 6f | 6e 61 6c 20 61 72 67 20 |...Optio|nal arg |
|000000f0| 4c 49 54 45 52 41 4c 20 | 6e 6f 6e 2d 6e 69 6c 20 |LITERAL |non-nil |
|00000100| 6d 65 61 6e 73 20 74 6f | 20 74 61 6b 65 20 4e 45 |means to| take NE|
|00000110| 57 54 45 58 54 20 6c 69 | 74 65 72 61 6c 6c 79 2e |WTEXT li|terally.|
|00000120| 20 49 66 20 4c 49 54 45 | 52 41 4c 20 69 73 20 0a | If LITE|RAL is .|
|00000130| 6e 69 6c 2c 20 63 68 61 | 72 61 63 74 65 72 20 60 |nil, cha|racter `|
|00000140| 5c 5c 27 20 69 73 20 74 | 68 65 20 73 74 61 72 74 |\\' is t|he start|
|00000150| 20 6f 66 20 6f 6e 65 20 | 6f 66 20 74 68 65 20 66 | of one |of the f|
|00000160| 6f 6c 6c 6f 77 69 6e 67 | 20 73 65 71 75 65 6e 63 |ollowing| sequenc|
|00000170| 65 73 3a 0a 20 20 5c 5c | 5c 5c 20 20 20 77 69 6c |es:. \\|\\ wil|
|00000180| 6c 20 62 65 20 72 65 70 | 6c 61 63 65 64 20 62 79 |l be rep|laced by|
|00000190| 20 61 20 73 69 6e 67 6c | 65 20 5c 5c 2e 0a 20 20 | a singl|e \\.. |
|000001a0| 5c 5c 26 20 20 20 77 69 | 6c 6c 20 62 65 20 72 65 |\\& wi|ll be re|
|000001b0| 70 6c 61 63 65 64 20 62 | 79 20 74 68 65 20 74 65 |placed b|y the te|
|000001c0| 78 74 20 77 68 69 63 68 | 20 6d 61 74 63 68 65 64 |xt which| matched|
|000001d0| 20 74 68 65 20 72 65 67 | 65 78 70 2e 0a 20 20 5c | the reg|exp.. \|
|000001e0| 5c 4e 20 20 20 77 68 65 | 72 65 20 4e 20 69 73 20 |\N whe|re N is |
|000001f0| 61 20 6e 75 6d 62 65 72 | 20 61 6e 64 20 31 20 3c |a number| and 1 <|
|00000200| 3d 20 4e 20 3c 3d 20 39 | 2c 20 77 69 6c 6c 20 62 |= N <= 9|, will b|
|00000210| 65 20 72 65 70 6c 61 63 | 65 64 0a 20 20 20 20 20 |e replac|ed. |
|00000220| 20 20 62 79 20 74 68 65 | 20 4e 74 68 20 73 75 62 | by the| Nth sub|
|00000230| 65 78 70 72 65 73 73 69 | 6f 6e 20 69 6e 20 52 45 |expressi|on in RE|
|00000240| 47 45 58 50 2e 20 53 75 | 62 65 78 70 72 65 73 73 |GEXP. Su|bexpress|
|00000250| 69 6f 6e 73 20 61 72 65 | 20 67 72 6f 75 70 65 64 |ions are| grouped|
|00000260| 0a 20 20 20 20 20 20 20 | 69 6e 73 69 64 65 20 5c |. |inside \|
|00000270| 5c 28 20 5c 5c 29 2e 0a | 0a 4f 70 74 69 6f 6e 61 |\( \\)..|.Optiona|
|00000280| 6c 20 61 72 67 20 47 4c | 4f 42 41 4c 20 6d 65 61 |l arg GL|OBAL mea|
|00000290| 6e 73 20 74 6f 20 72 65 | 70 6c 61 63 65 20 61 6c |ns to re|place al|
|000002a0| 6c 20 6d 61 74 63 68 65 | 73 20 69 6e 73 74 65 61 |l matche|s instea|
|000002b0| 64 20 6f 66 20 6f 6e 6c | 79 20 74 68 65 20 66 69 |d of onl|y the fi|
|000002c0| 72 73 74 2e 22 20 28 62 | 79 74 65 2d 63 6f 64 65 |rst." (b|yte-code|
|000002d0| 20 22 cb 20 18 cc 8e 09 | 83 52 00 cd ce ca ca 1d | ". ....|.R......|
|000002e0| 1c 1b 1a cf 0e 06 0e 07 | 0b 23 85 3e 00 d0 ce 21 |........|.#.>...!|
|000002f0| 14 d1 ce 21 15 0a 0e 07 | 0b 0c 4f 0e 08 83 33 00 |...!....|..O...3.|
|00000300| 0e 09 82 35 00 d2 20 51 | 12 0d 89 13 88 82 11 00 |...5.. Q|........|
|00000310| 88 0c 83 4d 00 0a 0e 07 | 0b ca 4f 50 82 4e 00 ca |...M....|..OP.N..|
|00000320| 2c 82 7c 00 cf 0e 06 0e | 07 ce 23 3f 83 61 00 ca |,.|.....|..#?.a..|
|00000330| 82 7c 00 0e 07 ce d0 ce | 21 4f 0e 08 83 72 00 0e |.|......|!O...r..|
|00000340| 09 82 74 00 d2 20 0e 07 | d1 ce 21 ca 4f 51 29 29 |..t.. ..|..!.OQ))|
|00000350| 87 22 20 5b 64 61 74 61 | 20 67 6c 6f 62 61 6c 20 |." [data| global |
|00000360| 72 65 73 75 6c 74 20 73 | 74 61 72 74 20 6d 61 74 |result s|tart mat|
|00000370| 63 68 62 65 67 69 6e 6e | 69 6e 67 20 6d 61 74 63 |chbeginn|ing matc|
|00000380| 68 65 6e 64 20 72 65 67 | 65 78 70 20 73 74 72 69 |hend reg|exp stri|
|00000390| 6e 67 20 6c 69 74 65 72 | 61 6c 20 6e 65 77 74 65 |ng liter|al newte|
|000003a0| 78 74 20 6e 69 6c 20 6d | 61 74 63 68 2d 64 61 74 |xt nil m|atch-dat|
|000003b0| 61 20 28 28 62 79 74 65 | 2d 63 6f 64 65 20 22 c1 |a ((byte|-code ".|
|000003c0| 08 21 87 22 20 5b 64 61 | 74 61 20 73 74 6f 72 65 |.!." [da|ta store|
|000003d0| 2d 6d 61 74 63 68 2d 64 | 61 74 61 5d 20 32 29 29 |-match-d|ata] 2))|
|000003e0| 20 22 22 20 30 20 73 74 | 72 69 6e 67 2d 6d 61 74 | "" 0 st|ring-mat|
|000003f0| 63 68 20 6d 61 74 63 68 | 2d 62 65 67 69 6e 6e 69 |ch match|-beginni|
|00000400| 6e 67 20 6d 61 74 63 68 | 2d 65 6e 64 20 65 6c 69 |ng match|-end eli|
|00000410| 62 2d 73 74 72 69 6e 67 | 2d 65 78 70 61 6e 64 2d |b-string|-expand-|
|00000420| 6e 65 77 74 65 78 74 5d | 20 31 34 29 29 0a 0a 28 |newtext]| 14))..(|
|00000430| 64 65 66 75 6e 20 65 6c | 69 62 2d 73 74 72 69 6e |defun el|ib-strin|
|00000440| 67 2d 65 78 70 61 6e 64 | 2d 6e 65 77 74 65 78 74 |g-expand|-newtext|
|00000450| 20 6e 69 6c 20 28 62 79 | 74 65 2d 63 6f 64 65 20 | nil (by|te-code |
|00000460| 22 c8 0a 47 c9 1b 19 18 | 08 09 57 85 70 00 0b 0a |"..G....|..W.p...|
|00000470| 08 48 1c ca 0c 55 83 60 | 00 cb 0a 08 54 89 10 48 |.H...U.`|....T..H|
|00000480| 89 14 55 83 30 00 0d cc | c8 21 cd c8 21 4f 82 5d |..U.0...|.!..!O.]|
|00000490| 00 0c ce 59 85 39 00 0c | cf 58 83 5a 00 0c d0 5a |...Y.9..|.X.Z...Z|
|000004a0| 1e 06 cc 0e 06 21 83 55 | 00 0d cc 0e 06 21 cd 0e |.....!.U|.....!..|
|000004b0| 06 21 4f 82 56 00 c9 29 | 82 5d 00 d1 0c 21 82 63 |.!O.V..)|.]...!.c|
|000004c0| 00 d1 0c 21 29 50 89 13 | 88 08 54 89 10 88 82 07 |...!)P..|..T.....|
|000004d0| 00 88 0b 2b 87 22 20 5b | 70 6f 73 20 6c 65 6e 20 |...+." [|pos len |
|000004e0| 6e 65 77 74 65 78 74 20 | 65 78 70 61 6e 64 65 64 |newtext |expanded|
|000004f0| 2d 6e 65 77 74 65 78 74 | 20 63 20 73 74 72 69 6e |-newtext| c strin|
|00000500| 67 20 6e 20 74 20 30 20 | 22 22 20 39 32 20 33 38 |g n t 0 |"" 92 38|
|00000510| 20 6d 61 74 63 68 2d 62 | 65 67 69 6e 6e 69 6e 67 | match-b|eginning|
|00000520| 20 6d 61 74 63 68 2d 65 | 6e 64 20 34 39 20 35 37 | match-e|nd 49 57|
|00000530| 20 34 38 20 63 68 61 72 | 2d 74 6f 2d 73 74 72 69 | 48 char|-to-stri|
|00000540| 6e 67 5d 20 31 30 29 29 | 0a 0a 28 64 65 66 75 6e |ng] 10))|..(defun|
|00000550| 20 73 74 72 69 6e 67 2d | 73 70 6c 69 74 20 28 70 | string-|split (p|
|00000560| 61 74 74 65 72 6e 20 73 | 74 72 69 6e 67 20 26 6f |attern s|tring &o|
|00000570| 70 74 69 6f 6e 61 6c 20 | 6c 69 6d 69 74 29 20 22 |ptional |limit) "|
|00000580| 5c 0a 53 70 6c 69 74 74 | 69 6e 67 20 6f 6e 20 72 |\.Splitt|ing on r|
|00000590| 65 67 65 78 70 20 50 41 | 54 54 45 52 4e 2c 20 74 |egexp PA|TTERN, t|
|000005a0| 75 72 6e 20 73 74 72 69 | 6e 67 20 53 54 52 49 4e |urn stri|ng STRIN|
|000005b0| 47 20 69 6e 74 6f 20 61 | 20 6c 69 73 74 20 6f 66 |G into a| list of|
|000005c0| 20 73 75 62 73 74 72 69 | 6e 67 73 2e 0a 4f 70 74 | substri|ngs..Opt|
|000005d0| 69 6f 6e 61 6c 20 74 68 | 69 72 64 20 61 72 67 20 |ional th|ird arg |
|000005e0| 4c 49 4d 49 54 20 28 3e | 3d 20 31 29 20 69 73 20 |LIMIT (>|= 1) is |
|000005f0| 61 20 6c 69 6d 69 74 20 | 74 6f 20 74 68 65 20 6c |a limit |to the l|
|00000600| 65 6e 67 74 68 20 6f 66 | 20 74 68 65 0a 72 65 73 |ength of| the.res|
|00000610| 75 6c 74 69 6e 67 20 6c | 69 73 74 2e 22 20 28 62 |ulting l|ist." (b|
|00000620| 79 74 65 2d 63 6f 64 65 | 20 22 c8 20 18 c9 8e ca |yte-code| ". ....|
|00000630| 0a 0b 5c 22 19 0b cb 09 | 4f 43 1c cc 1d 09 85 19 |..\"....|OC......|
|00000640| 00 cd cb 21 1e 06 0e 06 | 85 54 00 ce 0e 07 21 3f |...!....|.T....!?|
|00000650| 86 2c 00 0d 0e 07 57 85 | 35 00 ca 0a 0b 0e 06 23 |.,....W.|5......#|
|00000660| 85 54 00 cf cb 21 11 0d | 54 15 0b 0e 06 09 4f 0c |.T...!..|T.....O.|
|00000670| 42 14 cd cb 21 16 06 0e | 06 89 11 88 82 20 00 88 |B...!...|..... ..|
|00000680| ce 0e 07 21 3f 86 61 00 | 0d 0e 07 57 85 66 00 0e |...!?.a.|...W.f..|
|00000690| 06 85 72 00 0b 0e 06 d0 | 4f 0c 42 89 14 88 d1 0c |..r.....|O.B.....|
|000006a0| 21 2c 29 29 87 22 20 5b | 64 61 74 61 20 73 74 61 |!,))." [|data sta|
|000006b0| 72 74 20 70 61 74 74 65 | 72 6e 20 73 74 72 69 6e |rt patte|rn strin|
|000006c0| 67 20 72 65 73 75 6c 74 | 20 63 6f 75 6e 74 20 65 |g result| count e|
|000006d0| 6e 64 20 6c 69 6d 69 74 | 20 6d 61 74 63 68 2d 64 |nd limit| match-d|
|000006e0| 61 74 61 20 28 28 62 79 | 74 65 2d 63 6f 64 65 20 |ata ((by|te-code |
|000006f0| 22 c1 08 21 87 22 20 5b | 64 61 74 61 20 73 74 6f |"..!." [|data sto|
|00000700| 72 65 2d 6d 61 74 63 68 | 2d 64 61 74 61 5d 20 32 |re-match|-data] 2|
|00000710| 29 29 20 73 74 72 69 6e | 67 2d 6d 61 74 63 68 20 |)) strin|g-match |
|00000720| 30 20 31 20 6d 61 74 63 | 68 2d 65 6e 64 20 69 6e |0 1 matc|h-end in|
|00000730| 74 65 67 65 72 70 20 6d | 61 74 63 68 2d 62 65 67 |tegerp m|atch-beg|
|00000740| 69 6e 6e 69 6e 67 20 6e | 69 6c 20 6e 72 65 76 65 |inning n|il nreve|
|00000750| 72 73 65 5d 20 31 31 29 | 29 0a |rse] 11)|). |
+--------+-------------------------+-------------------------+--------+--------+